home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
DSAT_ANA
/
DSAT.H
< prev
next >
Wrap
Text File
|
1988-11-02
|
2KB
|
93 lines
/*
System error alert table editor
"DSAT.h"
*/
enum {
type_unknown,
type_alert, /* Alert definition */
type_text, /* Text definition */
type_icon, /* Icon definition */
type_button, /* Button definition */
type_string, /* String drawn in button definition */
type_code /* Procedure definition */
};
#define HEADER /* Header for all definition records */ \
int id; /* Definition id */ \
int length; /* Length of rest of definition */
typedef struct { /* Unidentified definition */
HEADER
char data[2];
} UNKNOWN;
typedef struct { /* Alert definition */
HEADER
int text1; /* Primary text definition id */
int text2; /* Secondary text definition id */
int icon; /* Icon definition id */
int code; /* Procedure definition id */
int button; /* Button definition id */
} ALERT;
typedef struct { /* Text definition */
HEADER
Point location; /* Location of text (global coordinates) */
char text[2]; /* NUL terminated character string */
} TEXT;
typedef struct { /* Icon definition */
HEADER
Rect location; /* Location of icon (global coordinates) */
char icon[128]; /* Icon data */
} ICON;
typedef struct { /* Procedure definition */
HEADER
char code[2]; /* Procedure code */
} CODE;
typedef struct { /* Button */
int string; /* String id */
Rect location; /* Button location */
int code; /* Procedure definition id */
} BUTTON;
typedef struct { /* Button definition */
HEADER
int buttons; /* Number of buttons */
BUTTON button[1];
} BUTTONS;
typedef struct { /* String drawn in button definition */
HEADER
char string[2]; /* Text (length characters) */
} STRING;
typedef union { /* Definition from alert table */
UNKNOWN u;
ALERT a;
TEXT t;
ICON i;
CODE c;
BUTTONS b;
STRING s;
} DEFINITION, *DEFINITION_PTR;
typedef struct { /* Alert table */
int count; /* Number of definitions + 1 in table */
DEFINITION definition[1]; /* Definitions */
} TABLE, *TABLE_PTR, **TABLE_HDL;
typedef struct { /* Information about definition */
int type; /* Type of definition */
int flag; /* Further information */
DEFINITION_PTR definition; /* Adress into alert table */
} TYPE, *TYPE_PTR, **TYPE_HDL;
typedef int (* PFI)(); /* Pointer to function returning int */
extern Ptr DSAlertTab: 0x2BA; /* System error alert table */
extern Rect DSAlertRect: 0x3F8; /* Display rectangle for error alerts */